<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUpgradeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('upgrade', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('channel_id')->comment('渠道Id')->default(0);
            $table->string('channel_name')->comment('渠道名称')->default('');
            $table->string('url')->comment('渠道下载地址')->default('');
            $table->string('version')->comment('最新版本号')->default('');
            $table->text('explain')->comment('更新文案');
            $table->tinyInteger('type')->comment('升级类型 1:强制更新 2:普通升级')->default(2);
            $table->tinyInteger('jump_type')->comment('跳转类型 1:直接下载 2:跳到应用市场')->default(1);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('upgrade');
    }
}
